home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / NextAnswers / 2050_fstab_manpage.txt < prev    next >
Text File  |  1995-10-12  |  6KB  |  161 lines

  1.  
  2.  
  3. MNTENT(5)           UNIX Programmer's Manual            MNTENT(5)
  4.  
  5. NAME
  6.      mntent, fstab - static information about filesystems
  7.  
  8. SYNOPSIS
  9.      #include <mntent.h>
  10.  
  11. DESCRIPTION
  12.      NOTE:  Unless NetInfo is disabled, /etc/fstab is accessed
  13.      only at boot time, when it's used to mount all file systems
  14.      of type 4.3.
  15.  
  16.      The file /etc/fstab describes the file systems and swapping
  17.      partitions used by the local machine.  It is created by the
  18.      system administrator using a text editor, and processed by
  19.      commands which mount, unmount, check consistency of, dump
  20.      and restore file systems, and by the system in providing
  21.      swap space.
  22.  
  23.      It consists of a number of lines of the form:
  24.  
  25.           fsname dir type opts freq passno
  26.  
  27.      an example of which would be:
  28.  
  29.           /dev/xy0a / 4.3 rw,noquota 1 2
  30.  
  31.      The entries in this file are accessed using the routines in
  32.      getmntent(3), which returns a structure of the following
  33.      form:
  34.  
  35.           struct mntent {
  36.                  char  *mnt_fsname;  /* file system name */
  37.                  char  *mnt_dir;     /* file system path prefix */
  38.                  char  *mnt_type;    /* 4.3, nfs, dos, macintosh, nucfs, cfs, or ignore */
  39.                  char  *mnt_opts;    /* ro, etc. */
  40.                  int   mnt_freq;     /* dump frequency, in days */
  41.                  int   mnt_passno;   /* pass number on parallel fsck */
  42.           };
  43.  
  44.      There is one entry per line in the file, and the fields are
  45.      separated by white space.  A ``#'' as the first non-white
  46.      character indicates a comment.
  47.  
  48.      The mnt_opts field consists of a string of comma separated
  49.      options.  Some of the options are common to all filesystem
  50.      types, and others only make sense for a single filesystem
  51.      type.  It is important to specify that a removable filesys-
  52.      tem (such as floppy disk) is removable, or ro if a filesys-
  53.      tem is read-only.  See mount(8) for a more complete descrip-
  54.      tion of the options available.
  55.  
  56.      The mnt_type field determines how the mnt_fsname, and
  57.      mnt_opts fields will be interpreted.  Below is a list of the
  58.      file system types currently supported and the way each of
  59.      them interprets these fields.  See
  60.      /NextDeveloper/Headers/bsd/mntent.h for additional, though
  61.      unsupported, file system types.
  62.  
  63.      4.3
  64.  
  65.           mnt_fsname  Must be a block special device.
  66.  
  67.           mnt_opts    Valid opts are: ro, rw, suid, nosuid.
  68.  
  69.      nfs
  70.  
  71.           mnt_fsname  servername:volumename to be mounted
  72.  
  73.           mnt_opts    Valid opts are: ro, rw, nosuid, hard, soft,
  74.                       bg, fg, retry, rsize, wsize, timeo,
  75.                       retrans, port, intr, net, secure, grpid,
  76.                       nosub, multi, acregmin, acregmax, noac,
  77.                       acdirmin, acdirmax.
  78.  
  79.      dos
  80.  
  81.           mnt_fsname  Must be a raw device.
  82.  
  83.           mnt_opts    Ignored.
  84.  
  85.           NOTE:  This file system does not support SCSI hard
  86.           disks, CD-ROMs, or 2.88 MB floppies; it supports only
  87.           720KB and 1.4 MB floppies.  To mount a dos volume, the
  88.           appropriate loadable kernel server must already be
  89.           loaded into the system.
  90.  
  91.      macintosh
  92.  
  93.           mnt_fsname  Must be a raw device.
  94.  
  95.           mnt_opts    Ignored.
  96.  
  97.           NOTE:  To mount a macintosh volume, the appropriate
  98.           loadable kernel server must already be loaded into the
  99.           system.
  100.  
  101.      nucfs (NetWare UNIX Client file system)
  102.  
  103.           mnt_fsname  servername:volumename to be mounted
  104.  
  105.           mnt_opts    Valid opts are:  ro, uid=someuser.
  106.  
  107.           NOTE:  To mount a nucfs volume you must be root. In
  108.           addition, either root must be authenticated to the
  109.           NetWare server, or the mount option uid=someuser must
  110.           be included to specify the UNIX user name or uid of a
  111.           NeXT user who is already authenticated to the NetWare
  112.           server.
  113.  
  114.      cfs (CD-ROM file system)
  115.  
  116.           mnt_fsname  Must be a raw device.
  117.  
  118.           mnt_opts    Ignored.
  119.  
  120.           NOTE:  To mount a cfs volume, the appropriate loadable
  121.           kernel server must already be loaded into the system.
  122.  
  123.      If the mnt_type is specified as ``ignore'' the entry is
  124.      ignored.  This is useful to show disk partitions which are
  125.      currently not used.  Disks that are specified as as
  126.      ``ignore'' are also not automounted by the Workspace in
  127.      NEXTSTEP.  This is useful when your disk has data in a for-
  128.      mat that NEXTSTEP doesn't recognize, and you want it to
  129.      ignore the disk.
  130.  
  131.      The field mnt_freq indicates how often each partition should
  132.      be dumped by the dump(8) command (and triggers that
  133.      command's w option which tells which file systems should be
  134.      dumped).  Most systems set the mnt_freq field to 1, indicat-
  135.      ing that the file systems are dumped each day.
  136.  
  137.      The final field mnt_passno is used by the disk consistency
  138.      check program fsck(8) to allow overlapped checking of file
  139.      systems during a reboot.  All file systems with mnt_passno
  140.      of 1 are first checked simultaneously, then all file systems
  141.      with mnt_passno of 2, and so on.  It is usual to make the
  142.      mnt_passno of the root file system have the value 1, and
  143.      then check one file system on each available disk drive in
  144.      each subsequent pass to the exhaustion of file system parti-
  145.      tions.
  146.  
  147.      /etc/fstab is only read by programs, and not written; it is
  148.      the duty of the system administrator to properly create and
  149.      maintain this file.  The order of records in /etc/fstab is
  150.      important because fsck, mount, and umount process the file
  151.      sequentially; file systems must appear after file systems
  152.      they are mounted within.
  153.  
  154. FILES
  155.      /etc/fstab
  156.  
  157. SEE ALSO
  158.      fsck(8), getmntent(3), mount(8), quotacheck(8), quotaon(8),
  159.      umount(8)
  160.  
  161.